package customize

import (
	v1 "gitcode.com/G-YT/baoyou/server/api/v1"
	"github.com/gin-gonic/gin"
)

type ConstitutionRouter struct{}

func (c *ConstitutionRouter) InitConstitutionRouter(privateRouter *gin.RouterGroup, publicRouter *gin.RouterGroup) {
	constitutionRouter := privateRouter.Group("assess")
	constitutionPrivateRouter := privateRouter.Group("constitution")
	constitutionPublicRouter := publicRouter.Group("constitution")
	constitutionApi := v1.ApiGroupApp.CustomizeApiGroup.ConstitutionApi
	{
		constitutionRouter.GET("getPhysiqueQuestion", constitutionApi.GetConstitutionQuestion)           // 获取体质问卷
		constitutionRouter.POST("submitPhysiqueQuestion", constitutionApi.SubmitConstitutionQuestion)    // 提交体质问卷
		constitutionRouter.GET("getQuestionResult", constitutionApi.GetConstitutionResult)               // 获取问卷结果
		constitutionRouter.GET("getQuestionResultList", constitutionApi.GetConstitutionResultList)       // 获取问卷结果列表
		constitutionRouter.GET("getOneQuestionResultByID", constitutionApi.GetOneConstitutionResultByID) // 根据ID获取问卷结果
	}
	{
		constitutionPrivateRouter.POST("createConstitution", constitutionApi.CreateConstitution)             // 新建体质
		constitutionPrivateRouter.DELETE("deleteConstitution", constitutionApi.DeleteConstitution)           // 删除体质
		constitutionPrivateRouter.DELETE("deleteConstitutionByIds", constitutionApi.DeleteConstitutionByIds) // 批量删除体质
		constitutionPrivateRouter.PUT("updateConstitution", constitutionApi.UpdateConstitution)              // 更新体质
		constitutionPrivateRouter.POST("setConstitutionArticle", constitutionApi.SetConstitutionArticle)     // 设置体质文章关系
		constitutionPrivateRouter.GET("getConstitutionArticle", constitutionApi.GetConstitutionArticle)      // 获取体质文章关系
	}
	{
		constitutionPublicRouter.GET("findConstitution", constitutionApi.FindConstitution)       // 根据ID获取体质
		constitutionPublicRouter.GET("getConstitutionList", constitutionApi.GetConstitutionList) // 获取体质列表
	}
}
